<?php
/**
 * Created by PhpStorm.
 * User: xudongsheng
 * Date: 2017/9/4
 * Time: 上午11:28
 */

namespace app\admin\controller;


use app\admin\model\Admin;
use app\admin\model\AuthHandle;
use app\admin\model\Config;
use Auth\Auth;
use think\Controller;
use think\Request;

class Common extends Controller
{
    public function __construct(Request $request = null)
    {
        parent::__construct($request);

    }


    public function _initialize()
    {
        // 验证登录
        Admin::check_login() OR $this->redirect('check/login');

        (new AuthHandle())->AuthCheck() OR $this->error('你没有此权限！');
        // 获取配置
        \config('C',Config::getConf());
    }




}